Skip to content

feat: remote config #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 6, 2023
Merged

feat: remote config #55

merged 4 commits into from
Apr 6, 2023

Conversation

Salakar
Copy link
Member

@Salakar Salakar commented Mar 20, 2023

Testing

Deployed the following function:

from firebase_functions import remote_config_fn, options
from firebase_admin import initialize_app

initialize_app()

options.set_global_options(region=options.SupportedRegion.EUROPE_WEST1)

@remote_config_fn.on_config_updated()
def onupdate(update: remote_config_fn.CloudEvent):
    print('REMOTE CONFIG FUNCTION TRIGGERED')
    print(update.data)

Function deployed successfully:

image

The function triggers and prints when the remote config is updated:

image

Comment on lines +338 to +339
assert kwargs["event_filters"] is not None
assert kwargs["event_type"] is not None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh interesting - are assert statements necessary or was it accidentally left from some testing?

Copy link
Member Author

@Salakar Salakar Apr 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are to validate the internal usages of this method; they're not necessary but help ensure these specific kwargs values are provided when adding new modules/function types so the error messages are a bit more friendly for us when developing new modules currently.

I plan to remove them all and move all the _endpoint generation stuff into the private modules at some point and be more explicit on their argument requirements - but I'm focusing on user-facing changes right now - I've added a ticket to the board to track this

@taeold
Copy link
Collaborator

taeold commented Apr 5, 2023

@Salakar Can we resolve the merge conflict?

@Salakar
Copy link
Member Author

Salakar commented Apr 6, 2023

@Salakar Can we resolve the merge conflict?

@taeold done

@taeold taeold merged commit 08586c8 into firebase:main Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants